import { sha256 } from 'js-sha256'
import { useUserStore } from '@/store'

const useStore = useUserStore()

export const secret = params => {
  const { token, uid } = useStore
  return {
    Authorization: token,
    'x-sendData': params,
    'x-sign': sha256(params + uid),
  }
}
